<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="F:\Code\project\flask_blog\src\controllers\static\css\bootstrap.min.css">
</head>

<body>
  <div class="alert alert-warning" role="alert">
    <span id="text">asdijhadihia</span>
    <button onclick="main()">提交</button>
  </div>
</body>
<script src="F:\Code\project\flask_blog\src\controllers\static\js\jQuery.js"></script>
<script>
  function main() {
    // $("#text").hide()
    var blog = {"title": "Python"}
    $.ajax({
    url:"http://192.168.143.101:9000/blog/create",
    method:"post",
    contentType: "application/json",
    dataType: "json",
    data: JSON.stringify(blog),
    success:function (result) {
        alert(result.msg)
    },
    error:function () {
        alert("error")
    }
})
  }
</script>
</html>